<template>
  <div class="box">
    <h1>Child{{index}}</h1>
    <button @click="$emit('vue' , 100)">调用父组件的自定义事件</button>
    <button @click="$emit('click')">调用父组件传递的DOM事件</button>
  </div>
</template>

<script>
export default {
  name: "Child",
  props: ["index"] 
  
};
</script>

<style scoped>
.box {
  background: yellowgreen;
}
</style>
